<!DOCTYPE html>
<html>
<head>
<title>科成后台管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="scripts/jquery/jquery-1.7.1.js"></script>
<link href="style/authority/basic_layout.css" rel="stylesheet" type="text/css">
<link href="style/authority/common_style.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap-theme.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="scripts/authority/commonAll.js"></script>
<script type="text/javascript" src="scripts/jquery/jquery-1.4.4.min.js"></script>
<script src="scripts/My97DatePicker/WdatePicker.js" type="text/javascript" defer="defer"></script>
<script type="text/javascript" src="scripts/artDialog/artDialog.js?skin=default"></script>
<script type="text/javascript">
	/** 表单验证  **/
	function validateForm() {
		if ($("#fyXqName").val() == "") {
			art.dialog({
				icon : 'error',
				title : '友情提示',
				drag : false,
				resize : false,
				content : '填写房源小区',
				ok : true,
			});
			return false;
		}
		
	}
</script>
<style type="text/css">
/*单选按钮*/
.gcs-radio {
	display: none;
}

.gcs-radio+label {
	width: 20px;
	height: 20px;
	line-height: 20px;
	display: inline-block;
	text-align: center;
	vertical-align: bottom;
	border: 1px solid gray;
	border-radius: 50%;
	margin-bottom: 0;
}

.gcs-radio+label:hover {
	border: 1px solid #2783FB;
	cursor: pointer;
}

.gcs-radio:checked+label {
	background: #2783FB;
	border: 1px solid #2783FB;
}

.gcs-radio:checked+label:after {
	content: "\2022";
	font-size: 35px;
	color: white;
}
.submit{
	margin-top:20px;
	margin-left: 78px; 
	width: 100px;
	height: 35px;
	background-color: #CDDAEB;
	border: 0.5px solid #044599;
	border-radius: 10px;
	font-weight: bold;
}
.submit:hover{
	font-weight: bold;
	background-color:#044599;
	color: white;
}
</style>
</head>
<body onunload="javascript:window.opener.location.reload()">
	<form id="teachedit">
		<div id="container">
			<div id="nav_links">
				当前位置：教职工管理&nbsp;>&nbsp;<span style="color: #1A5CC6;">添加教师信息</span>
			</div>
			<div>
				<div class="input-group">
					<span class="input-group-addon">教师工号</span> <input
						type="text" class="form-control" name="teachId" id="teachId"/>
				</div>

				<div class="input-group">
					<span class="input-group-addon">姓名</span> <input
						type="text" class="form-control" name="teachName" id="teachName" />
				</div>

				<div class="input-group">
					<span class="input-group-addon">职务编号</span> <input
						type="text" class="form-control" name="positionNo" id="positionNo" />
				</div>

				<div class="input-group">
					<span class="input-group-addon">薪资待遇</span> <input
						type="text" class="form-control" name="salary" id="salary" />
				</div>

				<div class="input-group">
					<span class="input-group-addon">入职时间</span> <input
						type="month"  class="form-control" name="entryData"
						id="entryData" />
				</div>

				<div class="input-group">
					<span class="input-group-addon">性别</span>
					<div style="margin-top:3px; ">
						&nbsp;&nbsp;&nbsp;&nbsp;男&nbsp;&nbsp;<input type="radio" name="teachGender" class="gcs-radio" id="boy" value="男"/><label for="boy"></label>
						&nbsp;&nbsp;&nbsp;&nbsp;女&nbsp;&nbsp;<input type="radio" name="teachGender" class="gcs-radio" id="girl" value="女"/><label for="girl"></label>
					</div>
					
				</div>
				<input class="submit" type="button" id="submit" value="提   交 " />
				
			</div>
		</div>
	</form>
</body>
<script type="text/javascript">
$("#submit").click(function(){
	if(confirm("确认添加?")){
		$.ajax({
			type:"post",//请求类型
			url:"/EDUSystem/teacher/addteach.do",//请求路径
			dataType:"json",//响应的数据类型
			data:$("#teachedit").serialize(),
			success:function suc(dt){//响应成功后的回调函数
				if(dt.code==1){
					//window.close();
					alert("添加成功！");
				}else{
					alert(dt.message);
				}
				
				//location.href="stu_list.jsp";
			},
			errer:function err(){
				alert("服务器出现故障")
			}
		});
	}
	
})
</script>
</html>